import { createRouter, createWebHistory } from 'vue-router'
import routes from 'virtual:generated-pages';
import { setupLayouts } from 'layouts-generated'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
const routesWithLayout = setupLayouts(routes)
let router = createRouter({
    history: createWebHistory(),
    routes: routesWithLayout
})
router.beforeEach((to, form, next) => {
    NProgress.start()
    next()
})
router.afterEach(() => {
    NProgress.done()
})
export default router